<?php
namespace app\validate;

use think\Validate;

class CheckLearning extends Validate
{

    protected $rule =   [
        'title'  => 'require|length:1,50',
        'e_title'  => 'require|length:1,100',
        'type'  => 'require|number',
        'thumb'  => 'require',
        'content'  => 'require',
    ];

    protected $message  =   [
        'title.require' => '请填写课程标题！',
        'title.length' => '课程标题在1-50个字符之间！',
        'e_title.require' => '请填写课程标题(EN)！',
        'e_title.length' => '课程标题在1-100个字符之间！',
        'type.require' => '请选择可见范围！',
        'type.number' => '可见范围为数字！',
        'thumb.require' => '请上传课程封面！',
        'content.require' => '请填写课程说明！',

    ];

}